package org.example.what_mall.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.example.what_mall.entity.Goods;
import org.example.what_mall.entity.Order;
import org.example.what_mall.entity.Spec;
import org.example.what_mall.entity.User;
import org.example.what_mall.enums.OrderState;

import java.util.List;
import java.util.Map;

@Data
public class OneOrderInfoVO {
    private Order order;
    private User user;
    private Goods goods;
    private Spec spec;
    private List<Map<String, Object>> states = List.of(
            Map.of("id", OrderState.ALL.getCode(), "name", OrderState.ALL.getDescription()),
            Map.of("id", OrderState.CART.getCode(), "name", OrderState.CART.getDescription()),
            Map.of("id", OrderState.UNPAID.getCode(), "name", OrderState.UNPAID.getDescription()),
            Map.of("id", OrderState.UNSHIPPED.getCode(), "name", OrderState.UNSHIPPED.getDescription()),
            Map.of("id", OrderState.SHIPPED.getCode(), "name", OrderState.SHIPPED.getDescription())
            );
    public OneOrderInfoVO(Order order, User user, Goods goods, Spec spec) {
        this.order = order;
        this.user = user;
        this.goods = goods;
        this.spec = spec;
    }

}
